package unitTests;


import static org.junit.Assert.assertEquals;

import org.junit.Before;
import org.junit.Test;

import datamodels.GlobalDataStore;
/**
 * Performs JUnit testing on Conference class. 
 * 
 * @author Rithy Chhen
 */
public class DataStoreFillConferencesTest {

	GlobalDataStore my_data_store;
	@Before
	public void instantiate()
	{
		my_data_store = new GlobalDataStore();
	}
	@Test
	public void FillConferentTest()
	{
		//created the constructor. already call filldata. 
		//this test depend on the data from the txt file. At the moment I test this the text file contain. 
		//the information I need and it passes.
		//so the my_data_store already contain the data.
		assertEquals("the size of the conferences list", my_data_store.getConferenceCount(), 2);
		assertEquals("the first element in the conference list should be Example", 
				my_data_store.getConferences().get(1).getName(), "Example");
		assertEquals("the user of this conference should be", 
				my_data_store.getConferences().get(1).getUsers().get(0).getName(), "anthonny");
	}
}
